'/
' RabNet (Rabid Networking)
' 
' This is a strimmed down BlitzMax port of RakNet. It is basically inspired
' by RakNet, but is very strimmed down, and a bunch of new additional
' features has been added, all written from scratch.
' 
' Copyright (c) 2003 Jenkins Software LLC.
' RabNet written 2010 by Anton Berlin.
' 
' =========================================================================
' 
' All new features is free to use in any way, as long as you inlude
' Anton Berlin (or Anthony Berlin) as the orinial writer of the code.
' 
' All old features are subject to the appropriate license agreement.
' Creative Commons Licensees are subject to the license found at
' http://creativecommons.org/licenses/by-nc/2.5/
' 
' Single application licensees are subject to the license found at
' http://www.jenkinssoftware.com/SingleApplicationLicense.html
' 
' Custom license users are subject to the terms therein.
' 
' GPL license users are subject to the GNU General Public
' License as published by the Free Software Foundation; either version 3
' of the License, or (at your option) any later version.
'/

'// Network address for a system.
type SystemAddress extends Base

	'// -------------------------------------------------------------------------------------------------------------
	'// Return the ip address of this system as string, in an IP:PORT fasion.
	'// -------------------------------------------------------------------------------------------------------------
	method toString:string()
	
		return dottedIP(m_remoteAddress) + ":" + m_port;
	
	end method
	
	'// -------------------------------------------------------------------------------------------------------------
	'// The IP-address as seen on the internet.
	'// -------------------------------------------------------------------------------------------------------------
	field m_remoteAddress:int;
	
	'// -------------------------------------------------------------------------------------------------------------
	'// The IP-address as seen locally.
	'// -------------------------------------------------------------------------------------------------------------
	field m_localAddress:int;
	
	'// -------------------------------------------------------------------------------------------------------------
	'// The port of this system.
	'// -------------------------------------------------------------------------------------------------------------
	field m_port:int;

end type
